package Di14zhang;

public class PPT16 {
    String[] names = new String[4];
    public void addName(String name){
        for(int i = 0;i<names.length;i++){
            if(names[i]==null){
                names[i]=name;
                break;
            }
        }
    }
    public void show(){
            System.out.println(Arrays.toString(names)+"\t");
    }
    public void sortNames(){
        System.out.println(":");
        Arrays.sort(names);
        System.out.println(Arrays.toString(names));
    }

}


